package com.atguigu.springcloud0419.service;

import com.atguigu.springcloud0419.entities.CommonResult;
import com.atguigu.springcloud0419.entities.Payment;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
@Component
@FeignClient(value = "CLOUD-PAYMENT-SERVICE") //这个是8001service的端口地址，用于此项目远程调用
public interface PaymentFeignService {

    /**
     * 下面的方法和8001服务提供者一样
     * @param id
     * @return
     */
    @GetMapping(value = "/payment/get/{id}")
    CommonResult<Payment> getPaymentById(@PathVariable("id") Long id);

}
